﻿@using CMSMVC4.Filters
@using CMSMVC4.MultiResource
@model CMSMVC4.PageLang
@{Html.RenderAction("GetBanertop", "Menu", new { type = BanerType.ThietBi });}
<div id="main_mid">
    <div id="dichvu_mid_left">
        @{Html.RenderAction("ListService", "ThietBi", new { id = ViewBag.Id });}
        @{Html.RenderAction("ListNewsHot", "TinTuc");}
        @{Html.RenderAction("ListContact", "LienHe");}
        @{Html.RenderAction("GetBanerleft", "Menu", new { type = BanerType.ThietBi });}
    </div>
    <div id="load_tab">
        <div id="dichvu_mid_right">
            @if (Model != null)
            {
                Html.RenderAction("ListTab", "ThietBi", new { id = ViewBag.Id, idpage = ViewBag.IdPage });
            }
            <div id="thietbi">
                @if (Model != null)
                {
                    @Html.Raw(Model.FullContent)
                }
            </div>
            @if (ViewBag.IdPage != null)
            {
                Html.RenderAction("ListComment", "Comment", new { id = ViewBag.IdPage });
                <div id="load_comment">
                    @{Html.RenderAction("SendComment", "Comment", new { id = ViewBag.IdPage });}
                </div>
            }
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript">
    $(function () {
        $(".dichvu_mid_left_menu").click(function () {
            if ($(this).attr("paren") == '0') {
                var clc = $(this).attr("clc");
                var cur = $(this).attr("cur");
                if (cur == "off") {
                    if (clc == 'off') {
                        $(this).css({ 'background-image': 'url(/Images/Css/img/hover_03.png)',
                            'background-repeat': 'no-repeat'
                        });
                        $(this).attr("clc", "on");
                    } else {
                        $(this).css({ 'background-image': 'url(/Images/Css/img/menu-small_06.png)',
                            'background-repeat': 'no-repeat'
                        });
                        $(this).attr("clc", "off");
                    }
                }
                var id = $(this).attr("index");
                var size = $('#dichvu_mid_left_warpermenu .dichvu_mid_left_menu').size();
                for (var i = 0; i < size; i++) {
                    if ($('.dichvu_mid_left_menu').eq(i).attr('paren') == id) {
                        $('.dichvu_mid_left_menu').eq(i).slideToggle();
                    }
                }
            }
        });
    });
</script>
